package group.sicher.web.framework.home.serice;

import group.sicher.lock.annotation.MarsLock;
import group.sicher.lock.constant.MarsLockType;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: aron
 * @date: 2019-08-06 10:11
 */
@Service
public class MarsLockService {

    @MarsLock(lockType = MarsLockType.FAIR)
    public void methodTest(String name, int k) {
        for (int i = 0; i < 10; i++) {
            System.out.println("helllo:" + name + ":" + i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

}
